package com.sun.logging.controller;

import com.sun.logging.service.DemoService;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangquanwei
 * @version 1.0
 * @date 2024-12-16 13:57
 */
@RestController
@RequestMapping("/demo")
public class Demo {
    private static final Logger log = LoggerFactory.getLogger(Demo.class);

    @Resource
    private DemoService demoService;


    @RequestMapping("/test01")
    public String test(String test) {
        log.info("请求开始,请求参数为：{}",test);
        String result = demoService.test();
        log.info("请求结束，响应参数为：{}", result);
        return result;
    }

}
